﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DreamOnGameEngine.Main
{
    public class CWaitProcess:CProcess
    {
        protected uint m_uStart;
        protected uint m_uStop;
        public CWaitProcess(uint iNumMill)
            : base(PROCESS_TYPE.PROC_WAIT)
        {

            m_uStart = 0;
            m_uStop = iNumMill;
        }

        public override void VOnUpdate(int deltaMilliseconds)
        {
            base.VOnUpdate(deltaMilliseconds);
            if (m_bActive)
            {
                m_uStart += (uint)deltaMilliseconds;
                if (m_uStart >= m_uStop)
                    VKill();
            }

        }
    }
}
